<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page import="org.apache.commons.beanutils.locale.*" %>
<%@ taglib prefix="h"  tagdir="/WEB-INF/tags/html"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet"  href="<%=request.getContextPath()%>/css/display.css" type="text/css" media="screen" />
<script src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script src="<%=request.getContextPath()%>/js/form.js"></script>
<title>Admin</title>

</head>
<body>
	 <form method="post" action="save.jsp">
		 <c:if test="${empty param.id}" >
		 	<h1>Aggiunta ${bean.class.name}</h1> 
		 </c:if>
		 
		 <c:if test="${!empty param.id}" >
		 	<h1>Modifica ${bean.class.name}</h1> 
		 </c:if>
		 
		<fieldset>
			<legend>Dati</legend> 
			
			<c:forEach items="${fields}" var="col" varStatus="s">
				<h:inputtext size="70" id="${col.name}" label="${col.name}" value="${bean[col.name]}" /><br>
			</c:forEach> 
			<input class='button' type='submit' value='Salva' id='btnSave' /> 
			<input class='button' type='button' value='Esci' id='btnClose' onclick='document.location="list.jsp?action=Carica&classe=${param.classe}&circolo=${param.circolo}"'>
	 	</fieldset>

		
	 </form>

</body>
</html>